﻿//     Copyright (c) Microsoft Corporation.  All rights reserved.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.Gateway.Utils;
using Newtonsoft.Json;

namespace Gateway.UpdateService.Models
{
    public enum UpdateSeverity
    {
        Critical,
        Important,
        Optional,
    }

    public class PackageManifest
    {
        public PackageManifest()
        {
            this.Severity = UpdateSeverity.Optional;
            this.AvailablePackages = new List<FilePackage>();
        }

        [JsonConverter(typeof(GatewayVersionConverter))]
        public Version Version { get; set; }

        public string Description { get; set; }
        public UpdateSeverity Severity { get; set; }
        public bool Disabled { get; set; }

        public virtual IList<FilePackage> AvailablePackages { get; set; }

        [JsonIgnore]
        public string RootUri { get; set; }
    }
}